<template>
  <div>
    <h3>app组件</h3>
    <!-- 
      异步组件在初始加载时，可以提前给你一个提示
    -->
    <Suspense>
      <template #fallback>
        <h3>加载中...</h3>
      </template>
      <!-- <template id="default">
        <child />
      </template> -->
      <child />
    </Suspense>
  </div>
</template>

<script>
import { ref, defineAsyncComponent } from 'vue'

export default {
  components: {
    child: defineAsyncComponent(() => import('./components/child.vue'))
  },
  setup() {
    return {}
  }
}
</script>

<style lang="scss" scoped></style>
